<script type="text/javascript">
                /* wait for images to load */
                $(window).load( function() {
                    $('.sp-wrap').smoothproducts();
                });
        </script>
<!-- .container -->
<div class="container marginTop">
	<div class="col-lg-3 catlist">
		<div class="panel">
  		<div class="panel-heading panel-pink">
    		<h3 class="panel-title text-center">Categories</h3>
  		</div>
 		<div class="panel-body">
    	<div class="navbar-default sidebar" role="navigation">
                <div class="sidebar-nav navbar-collapse">
                    <ul class="nav" id="side-menu">
							<?php foreach ($category as $c):?>
                        <li <?php if($c->id == $this->uri->segment(3)){?>class="active"<?php }?>>
                           <?php if(!$c->children):?>
                            <a href="<?=site_url()?>categories/view/<?=$c->id?>/<?=$c->friendly_url_en?>"><?=$c->name_en?></a>
                           <?php endif;?>
                            <?php if($c->children):?>
                             <a href="#"><?=$c->name_en?> <span class="fa arrow"></span></a>
                            	<ul class="nav nav-second-level">
                            	<?php foreach ($c->children as $sub):?>
                                <li <?php if($sub->id == $this->uri->segment(3)){?>class="active"<?php }?>>
                                    <?php if(!$sub->children):?>
                                    <a href="<?=site_url()?>categories/view/<?=$sub->id?>/<?=$sub->friendly_url_en?>"><?=$sub->name_en?></a>
                                    <?php endif;?>
                                    <?php if($sub->children):?>
                                    <a href="#"><?=$sub->name_en?> <span class="fa arrow"></span></a>
                                    	 <ul class="nav nav-third-level">
                                    	 <?php foreach ($sub->children as $th):?>
                                        <li <?php if($th->id == $this->uri->segment(3)){?>class="active"<?php }?>>
                                            <a href="#"><?=$th->name_en?></a>
                                        </li>
                                        <?php endforeach;?>
                                    </ul>
                                    <!-- /.nav-third-level -->
                                    <?php endif;?>
                                </li>
                                <?php endforeach;?>
                            </ul>
                            <?php endif;?>
                        </li>
                        	<?php endforeach;?>                                                                                             
                    </ul>
                </div>
                <!-- /.sidebar-collapse -->
            </div>
            <!-- /.navbar-static-side -->
  		</div>
		</div>
	</div>
	
		<div class="col-lg-9 productDetail">
		<div class="row">
			<?php if(!$product){?>
  	<div class="alert alert-pink" role="alert">There are no products in this category...</div>
  		<?php }else{?>
	<div class="col-lg-6">
		<div class="sp-wrap">
		<?php if($photo){?>
		<?php foreach ($photo as $p):?>
		<a href="<?=base_url()?>../uploads/large/<?=$p->filename_l?>"><img src="<?=base_url()?>../uploads/thumbs/thumb_<?=$p->filename_l?>" alt=""></a>
		<?php endforeach;?>
		<?php }else{?>
		<a href="<?=base_url()?>../uploads/no-image.png"><img src="<?=base_url()?>../uploads/no-image.png" alt=""></a>
		<?php }?>
		</div>
	</div>
	<div class="col-lg-6">
		<div class="productInfo">
			<h4>Product Name: <?=$product->name_nl?></h4>
			<h4>Ref: <?=$product->reference_code?></h4>
			<h4>Price: <?php if($product->price){?><?=number_format($product->price,2,',','')?> €<?php }else{?>Asking for prices<?php }?></h4>
			<hr>
			<h4>Descriptions: </h4>
			<h5><?=$product->description_en?></h5>
			<hr>
			<a href="<?=site_url()?>categories/view/<?=$product->category->id?>/<?=$product->category->friendly_url_en?>" class="btn btn-xs btn-default">View all products of this category</a>
		</div>
	
	</div>
	
     	<?php }?>
</div>
	
	</div>
	
	
</div>